function animate(obj,target,callback){
    clearInterval(obj.timer);
    obj.timer=setInterval(function (){
        //步长=目标距离-当前距离/10
        let step=(target-obj.offsetLeft)/10;
        step=step>0?Math.ceil((target-obj.offsetLeft)/10):Math.floor((target-obj.offsetLeft)/10);
        if(obj.offsetLeft===target){
            clearInterval(obj.timer);
            // if(callback){
            //     callback();
            // }
            callback && callback();
        }
        obj.style.left=obj.offsetLeft+step+'px';
    },15)
}